refactor: resolve chat tools per-tool instead of all-or-nothing#973
Merged
refactor: resolve chat tools per-tool instead of all-or-nothing#973
Conversation
Remove the hardcoded chat short-circuit that returned zero tools when the acting user lacked datamachine_use_tools. Chat tool visibility should be resolved per-tool via ability permissions, access_level metadata, and agent policy. Untagged tools remain admin-only by default, so this safely unblocks lower-privilege tool tiers without exposing privileged tools. Preserve the old coarse gate behind a datamachine_require_use_tools_for_chat_tools filter for installs that want legacy behavior during migration.
inc/Abilities/AgentPingAbilities.php inc/Abilities/AgentTokenAbilities.php inc/Abilities/Analytics/BingWebmasterAbilities.php inc/Abilities/Analytics/GoogleAnalyticsAbilities.php inc/Abilities/Analytics/GoogleSearchConsoleAbilities.php inc/Abilities/Analytics/PageSpeedAbilities.php inc/Abilities/AuthAbilities.php inc/Abilities/ChatAbilities.php inc/Abilities/Content/EditPostBlocksAbility.php inc/Abilities/Content/ReplacePostBlocksAbility.php inc/Abilities/Email/EmailAbilities.php inc/Abilities/Engine/ExecuteStepAbility.php inc/Abilities/Engine/PipelineBatchScheduler.php inc/Abilities/EngineAbilities.php inc/Abilities/Fetch/FetchEmailAbility.php inc/Abilities/Fetch/FetchFilesAbility.php inc/Abilities/Fetch/FetchRssAbility.php inc/Abilities/Fetch/FetchWordPressApiAbility.php inc/Abilities/Fetch/FetchWordPressMediaAbility.php inc/Abilities/Fetch/GetWordPressPostAbility.php inc/Abilities/Fetch/QueryWordPressPostsAbility.php inc/Abilities/File/AgentFileAbilities.php inc/Abilities/File/FlowFileAbilities.php inc/Abilities/Flow/FlowHelpers.php inc/Abilities/Flow/PauseFlowAbility.php inc/Abilities/Flow/ResumeFlowAbility.php inc/Abilities/FlowAbilities.php inc/Abilities/FlowStep/FlowStepHelpers.php inc/Abilities/FlowStepAbilities.php inc/Abilities/Handler/TestHandlerAbility.php inc/Abilities/HandlerAbilities.php inc/Abilities/InternalLinkingAbilities.php inc/Abilities/Job/JobHelpers.php inc/Abilities/JobAbilities.php inc/Abilities/Media/ImageGenerationAbilities.php inc/Abilities/Pipeline/PipelineHelpers.php inc/Abilities/PipelineAbilities.php inc/Abilities/PipelineStepAbilities.php inc/Abilities/ProcessedItemsAbilities.php inc/Abilities/Publish/PublishWordPressAbility.php inc/Abilities/Publish/SendEmailAbility.php inc/Abilities/SettingsAbilities.php inc/Abilities/StepTypeAbilities.php inc/Abilities/Taxonomy/CreateTaxonomyTermAbility.php inc/Abilities/Taxonomy/DeleteTaxonomyTermAbility.php inc/Abilities/Taxonomy/GetTaxonomyTermsAbility.php inc/Abilities/Taxonomy/ResolveTermAbility.php inc/Abilities/Taxonomy/UpdateTaxonomyTermAbility.php inc/Abilities/TaxonomyAbilities.php inc/Api/AgentFiles.php inc/Api/AgentPing.php inc/Api/Agents.php inc/Api/Analytics.php inc/Api/Auth.php inc/Api/Chat/Chat.php inc/Api/Chat/ChatOrchestrator.php inc/Api/Chat/Tools/AddPipelineStep.php inc/Api/Chat/Tools/CreatePipeline.php inc/Api/Email.php inc/Api/Execute.php inc/Api/FlowFiles.php inc/Api/Flows/FlowQueue.php inc/Api/Flows/FlowScheduling.php inc/Api/Flows/FlowSteps.php inc/Api/Flows/Flows.php inc/Api/Handlers.php inc/Api/InternalLinks.php inc/Api/Jobs.php inc/Api/Logs.php inc/Api/Pipelines/PipelineFlows.php inc/Api/Pipelines/PipelineSteps.php inc/Api/Pipelines/Pipelines.php inc/Api/ProcessedItems.php inc/Api/Providers.php inc/Api/Settings.php inc/Api/StepTypes.php inc/Api/Tools.php inc/Api/Users.php inc/Api/WebhookTrigger.php inc/Cli/Commands/AgentsCommand.php inc/Cli/Commands/EmailCommand.php inc/Cli/Commands/Flows/FlowsCommand.php inc/Cli/Commands/PipelinesCommand.php inc/Cli/Commands/ProcessedItemsCommand.php inc/Cli/Commands/RetentionCommand.php inc/Cli/Commands/TestCommand.php inc/Core/ActionScheduler/ActionsCleanup.php inc/Core/Admin/FlowFormatter.php inc/Core/Auth/AgentAuthCallback.php inc/Core/Auth/AgentAuthMiddleware.php inc/Core/Auth/AgentAuthorize.php inc/Core/Database/Agents/AgentAccess.php inc/Core/Database/Agents/AgentTokens.php inc/Core/Database/Logs/LogRepository.php inc/Core/Database/PostIdentityIndex/PostIdentityIndex.php inc/Core/OAuth/OAuth2Handler.php inc/Core/Steps/Fetch/Handlers/WordPress/WordPress.php inc/Core/Steps/Fetch/Handlers/WordPressMedia/WordPressMedia.php inc/Core/Steps/Fetch/Tools/SkipItemTool.php inc/Core/Steps/Publish/Handlers/PublishHandler.php inc/Core/Steps/Update/UpdateStep.php inc/Engine/AI/System/SystemAgentServiceProvider.php inc/Engine/AI/System/Tasks/AltTextTask.php inc/Engine/AI/System/Tasks/ImageGenerationTask.php inc/Engine/AI/System/Tasks/ImageOptimizationTask.php inc/Engine/AI/System/Tasks/InternalLinkingTask.php inc/Engine/AI/System/Tasks/MetaDescriptionTask.php inc/Engine/AI/Tools/Global/AgentDailyMemory.php inc/Engine/AI/Tools/Global/AgentMemory.php inc/Engine/AI/Tools/Global/AmazonAffiliateLink.php inc/Engine/AI/Tools/Global/InternalLinkAudit.php inc/Engine/AI/Tools/Global/LocalSearch.php inc/Engine/AI/Tools/Global/WebFetch.php inc/Engine/AI/Tools/Global/WordPressPostReader.php inc/migrations.php
Contributor
Homeboy Results —
|
chubes4
added a commit
that referenced
this pull request
Mar 25, 2026
…cope fix: revert out-of-scope Homeboy autofix from #973
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the hardcoded chat short-circuit in
ToolPolicyResolverthat returned zero tools whenever the acting user lackeddatamachine_use_tools.That coarse gate blocks the future Roadie model where:
What changed
datamachine_require_use_tools_for_chat_toolsaccess_levelWhy this matters
This is the first core unblocker for making Roadie a true dynamic per-user assistant instead of an all-or-nothing tool surface.
Validation
homeboy test data-machine→ repo has many pre-existing failures unrelated to this changehomeboy lint data-machine→ repo has many pre-existing lint/static-analysis issues unrelated to this change